package com.github.raffle.behavior.state.color;

/**
 * 状态管理器
 * @author Stephen Liu
 * @since Jan 27, 2016
 * @version 1.0.0
 */
public class ColorContext {
	private ColorState state;
	public ColorState getState() {
		return state;
	}
	public void setState(ColorState state) {
		this.state = state;
	}
	public ColorContext(ColorState state) {
		this.state = state;
	}
	public void push() {
		state.handlePush(this);
		Sample sample = new Sample(state.getColor());
		sample.operate();
	}
	public void pull() {
		state.handlePull(this);
		Sample sample = new Sample(state.getColor());
		sample.operate();
	}
}
